<template>
  <div>
    <h3>树形组件</h3>
    <el-tree default-expand-all :data="category" :props="{label:'name',children:'son'}" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      category: [
        { name: '男装', son: [{ name: '西服' }] },
        { name: '女装', son: [{ name: '连衣裙' }] },
        { name: '数码', son: [{ name: '手机', son: [
          { name: '华为' },
          { name: '苹果' },
          { name: '三星', son: [{ name: 'x20' }, { name: '千元机' }] }] },
        { name: '电脑' }] }
      ]
    }
  }
}
</script>

<style>
</style>
